package com.xqboss.web.controller.synthesis;

import com.xqboss.apps.dto.synthesis.SynthesisUserRecordPageDto;
import com.xqboss.apps.service.synthesis.SynthesisUserRecordService;
import com.xqboss.apps.vo.synthesis.SynthesisUserRecordVo;
import com.xqboss.common.core.controller.BaseController;
import com.xqboss.common.core.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Trent
 * @date 2023/8/15
 */
@Api(tags = "合成-用户合成记录")
@RestController
@RequestMapping("/web/synthesis")
public class WebSynthesisUserRecordController extends BaseController {

    @Autowired
    private SynthesisUserRecordService synthesisUserRecordService;

    @PreAuthorize("@ss.hasPermi('web:synthesis:userRecordList')")
    @ApiOperation("用户合成记录")
    @GetMapping("/userRecordList")
    public R<List<SynthesisUserRecordVo>> userRecordList(@Validated SynthesisUserRecordPageDto pageDto){
        return R.ok(synthesisUserRecordService.userWebSynthesisList(pageDto));
    }

}
